home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / rc-1.000 / rc-1 / rc-1.5-linux / addon.h next >
Encoding:
C/C++ Source or Header  |  1994-07-28  |  1.2 KB  |  32 lines

  1. /* This file is the interface to the rest of rc for any locally
  2.    defined addon builtins.  By default there are none.
  3.    The interface consists of the following macro.
  4. ADDONS: comma-separated list of pairs of function pointers and string literals.
  5. The builtins all have the form: void b_NAME(char **av);
  6. Builtins report their exit status using set(TRUE) or set(FALSE).
  7. */
  8.  
  9. /* MAKE SURE YOU USE COMMAS CORRECTLY! LAST ITEM SHOULDN'T HAVE ONE */
  10.  
  11. #ifdef ADDON
  12. #define ADDONS   \
  13.   { b_test,    "test"}, { b_test, "[" }, /* */   \
  14.   { b_expr,    "expr"},                  /* */   \
  15.   { b_getopt,  "getopt"},                /* */   \
  16.   { b_seq,     "seq"},                   /* */   \
  17.   { b_true,    "true"},                  /* */   \
  18.   { b_false,   "false"},                 /* */   \
  19.   { b_read,    "read"},                  /* */   \
  20.   { b_ssub,    "ssub"}                   /* */    
  21.  
  22. extern void b_test(char **av);   /* */
  23. extern void b_expr(char **av);   /* */
  24. extern void b_getopt(char **av); /* */
  25. extern void b_seq(char **av);    /* */
  26. extern void b_true(char **av);   /* */
  27. extern void b_false(char **av);  /* */
  28. extern void b_read(char **av);   /* */
  29. extern void b_ssub(char **av);   /* */
  30.  
  31. #endif
  32.